package com.tyersoft.kickcalendar.adapters;

import android.content.Context;
import android.widget.ArrayAdapter;

public abstract class ListAdapter extends ArrayAdapter<String> {
	public ListAdapter(Context context, int resource) {
		super(context, resource);
		fill();
		sort(null);
	}

	abstract void fill();
	
	public int getPos(String item) {
		for (int i = 0; i < getCount(); i++) {
			if (getItem(i).equalsIgnoreCase(item))
				return i;
		}
		return -1;
	}

}
